package d0311;

public class TrafficLight {
    private TrafficLightEnum type;
    public TrafficLightEnum getType(){
        return TrafficLightEnum.GREEN;
    }
    public static void main(String[] args) {
        TrafficLight trafficLight = new TrafficLight();
        switch (trafficLight.getType()) {
            case READ:
                System.out.println("红灯亮");
                break;
            case YELLOW:
                System.out.println("黄灯亮");
                break;
            case GREEN:
                System.out.println("绿灯亮");
        }
    }
}
